package com.lagou.web.controller;

import com.lagou.service.HelloService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author: 韩逊
 * @date: 2020-05-01 20:27
 * @Description:
 */

@Controller
public class IndexController {
    @Reference(timeout = 1000, retries = 0)
    private HelloService helloService;

    @GetMapping("/")
    @ResponseBody
    public String index() {
        return "<h1>" + helloService.hello() + "</h1>";
    }
}
